package com.yangyang.sp04.order.feign;

import com.yangyang.sp01.pojo.User;
import com.yangyang.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "user-service")
public interface UserClient {
    @GetMapping("/{userId}")
    JsonResult<User> getUser( @PathVariable Integer userId);
    @GetMapping("/{userID}/score")
    JsonResult<?> addScore(@PathVariable Integer userID , @RequestParam("score") Integer score);
}
